package com.zch.handle;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zch.entities.Employee;
import com.zch.service.EmployeeService;

@Controller
@RequestMapping("/employee")
public class EmployeeHandle {

	@Autowired
	private EmployeeService employeeService;
	
	@ResponseBody
	@RequestMapping("/getAllEmployee")
	public List<Employee> getAllEmployee(){
		return employeeService.getAllEmployee()	 ;
	}
	
	@ResponseBody
	@RequestMapping("/insertEmployee")
	public boolean insertEmployee(Employee employee){
		return employeeService.insertEmployee(employee);
	}
}
